Video predictive coding apparatus and method

ABSTRACT

A predictive coding in a video coding system, which can enhance the coding efficiency by predictively coding DC coefficients of a block to be coded using DC gradients of a plurality of previously coded neighboring blocks. The predictive coefficient is selected according to the difference between the quantized DC gradients (coefficients) of a plurality of neighboring blocks of the block to be coded, and the DC coefficient of the block to be coded is predictively coded by the selected predictive coefficient, thereby enhancing the coding efficiency.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of application Ser. No. 09/691,413, filed on Oct. 18, 2000, which is a continuation application of application Ser. No. 08/940,937, filed on Sep. 30, 1997, which claims priority to and the benefit of Korean Patent Application No. 96-42882 filed on Sep. 30, 1996, all of which are hereby incorporated by reference for all purposes as if fully set forth herein.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to predictive coding for a video encoding system, and more particularly, to a video predictive coding apparatus and method thereof, which can enhance the coding efficiency by predictively coding DC coefficients of a block to be coded using DC gradients of a plurality of previously coded neighboring blocks.

2. Description of the Related Art

In general, in conventional standards for video data compression such as MPEG-1, MPEG-2, JPEG, H.261, H.263 and so on, which adopts a block-oriented coding method, intra-mode blocks (to be referred to as intra blocks, hereinafter) which does not use a time- directional prediction, are coded and transmitted to a decoder by a texture coding using a 8*8 DCT (Discrete Cosine Transform) for reducing spatial redundancy of a signal.

Considerable parts of overall data to be transmitted are generated during the texture coding. Thus, the performance of an encoder is greatly affected by efficiently coding the data generated during the texture coding.

According to the H.263 method, in the case of an intra block, DC coefficients are quantized with a quantization step size of 8 into 8 bits after performing an 8*8 DCT, transmitted by performing a PCM (Pulse Code Modulation) on the same. According to the MPEG-2 method, to enhance the coding efficiency of DC coefficients, a difference between a quantized DC coefficient of a directly previous block having a relatively high spatial correlation and that of a current block, is transmitted in zig-zag scanning (luminance blocks) and progressive scanning (chrominance block) orders, as shown in FIG. 2.

Here, the zig-zag scanning and progressive scanning are dependent upon the coding order of a macroblock (16*16 pixels) in a frame.

n the MPEG-2, if the X-axis coordinate of the macroblock to be coded is 0, that is to say, if there is no block previously coded spatially), the predictive coded value (DC value), for the first luminance block in the macroblock, is 128, as shown in FIG. 2. Also, for the Chrominance block, the DC value is 128.

The 8*8 DCT is performed in an encoder, as expressed in the following equation (1), and IDCT (Inverse DCT) is performed in a decoder (and decoding parts for the reconstructed signal in the encoder), as expressed in the following equation (2). After performing DCT, DC and AC coefficients are arranged, as shown in FIG. 1.

Here, the DC coefficients correspond to F(0,0) of the equation (1), and the AC coefficients correspond to the remaining ones except the F(0,0). $\begin{matrix} \begin{matrix} {{F\left( {u,v} \right)} = {{1/4}{C(u)}{C(v)}{\sum\limits_{x = 0}^{7}{\sum\limits_{y = 0}^{7}{{f\left( {x,y} \right)}{\cos\left\lbrack {{\pi\left( {{2x} + 1} \right)}{u/16}} \right\rbrack}}}}}} \\ {\cos\left\lbrack {{\pi\left( {{2y} + 1} \right)}{v/16}} \right\rbrack} \end{matrix} & (1) \\ \begin{matrix} {{F\left( {x,y} \right)} = {{1/4}{\sum\limits_{x = 0}^{7}{\sum\limits_{y = 0}^{7}{C(u){C(v)}{F\left( {u,v} \right)}{\cos\left\lbrack {{\pi\left( {{2x} + 1} \right)}{u/16}} \right\rbrack}}}}}} \\ {\cos\left\lbrack {{\pi\left( {{2y} + 1} \right)}{v/16}} \right\rbrack} \end{matrix} & (2) \end{matrix}$ where u, v, x and y are 0, 1, 2, . . . 7, respectively, x and y are spatial positions in a pixel domain, u and v are spatial positions in a transform domain, u and x are horizontal indices, and v and y are vertical indices. Also, C(u),C(v)=1/√{square root over (2)} for u, v=0, and 1 otherwise (See ITU-T Recommendation H.263 Annex A: Inverse Transform Accuracy Specification, 6.2.4: Inverse Transform).

Also, f(x, y) represents video signal values within a 8* 8 block, and F(u, v) are DC and AC coefficients calculated from the equation (1). Also, F(u, v) of the equation (2) are DC and AC coefficients coded by the coder.

FIG. 3 shows a macroblock with a 4:2: Format, in a block-oriented coding method used in the conventional standards such as MPEG-1, MPEG-2, H.263, etc.

Here, the 4:2:0 video format represents ratio of sampling frequencies of three components, luminance information Y, and chrominance information Cb and Cr. The ratio of 4:2:0 is taken as a representative value of 4:2:0 and 4:0:2, which are alternative ratios of odd and even lines.

Also, the macroblock is composed of each 16 pixels horizontally and vertically, and is largely classified into four luminance blocks, i.e., L1 (Block 1 of luminance), L2 (Block 2 of luminance), L3 (Block 3 of luminance), and L4 (Block 4 of luminance), and two chrominance blocks, i.e., Cb and Cr. The respective pixels of C1(=Cb) and C2(=Cr) correspond to the positions of luminance components subsampled horizontally and vertically at the ratio of 2: 1, which is referred to as 4:2:0 video format, as shown in FIG. 3.

In the MPEG-2 or MPEG Video verification model version 2, during a texture coding, in the case of an intra frame (or intra picture) having a high spatial (intra-picture) correlativity of luminance and chromance values, DC predictive coding is performed in the consideration of only one neighboring block Because this prediction method does not sufficiently consider the characteristics of texture signals of the neighboring blocks of the block to be coded, but only the coding order of the block or the macroblock as mentioned above, the coding efficiency of the texture coding (especially DC coefficients) is low.

SUMMARY OF THE INVENTION

To solve the above problem, it is an object of the present invention to provide a predictive coding method, which can enhance the coding efficiency by predictively coding DC coefficients of a block to be coded using DC gradients of a plurality of previously coded neighboring blocks.

It is another object of the present invention to provide a predictive encoder, which can enhance the coding efficiency by predictively coding DC coefficients of a block to be coded using DC gradients of a plurality of previously coded neighboring blocks.

To accomplish the first object of the present invention, there is provided a block based video coding method, wherein predictive coefficients are selected depending on the difference between gradients of DC coefficients of a plurality of neighboring blocks of a block to be coded.

To accomplish the second object, there is provided a block based video coding apparatus comprising: an object boundary block padding portion for receiving a video signal and original shape information, filling non-object parts with a mean value of object parts; a DCT portion for receiving the video signal output from the object boundary block padding portion to perform a DCT, quantizing the transform coefficient and outputting the same; a transform coefficient and video information encoder for predictively coding DC coefficients using a spatial correlation between the transform coefficient of an arbitrary block output from the DCT portion, and the coded DC values of a plurality of neighboring blocks of the blocks to be coded; an IDCT portion for receiving the quantized transform cofficients from the DCT portion and inversely quantizing the received coefficients, filtering the transform coefficient and performing an IDCT; and a padded data eliminating portion for receiving the video signal output from the IDCT portion and reconstructed shape information, eliminating the padded data, and outputting the decoded video data.

Here, the transform coefficient and video information encoder includes a DC coefficient storage portion for storing the DC coefficient obtained from the DCT portion, a predictive block selector for selecting a referenced block to be used in prediction by the indices of three neighboring blocks of the current block, obtained from the DC coefficient storage portion, and a DPCM encoder for DPCM-coding the predictive value obtained from the predictive block selector and the quantized DC coefficient of the current block, obtained from the DCT portion.

Also, the predictive block selector includes a memory for storing indices for three neighboring blocks of the current block, obtained from the DC coefficient storage portion, first and second subtractors for selectively taking two among indices for the three blocks and mutually subtracting the same, first and second absolute value calculators for calculating absolute values output from the first and second subtractors, and a comparator for comparing the respective absolute values obtained from the first and second absolute value calculators and generating a selection control signal for selecting a predictive block according to the comparison result.

BRIEF DESCRIPTION OF THE DRAWINGS

The above objects and advantages of the present invention will become more apparent by describing in detail a preferred embodiment thereof with reference to the attached drawings in which:

FIG. 1 is a diagram showing positions of DC and AC coefficients after performing a conventional DCT;

FIG. 2 is a sequence diagram of a conventional predictive coding of MPEG-2 DC coefficients;

FIG. 3 shows a general 4:2:0 video format;

FIG. 4 is a diagram showing a macroblock in the general 4:2:0 video format;

FIG. 5 is a schematic diagram of a VOP video coder of MPEG-4 primarily fixed by the international standard subsidiary organization;

FIG. 6 is a diagram showing positions of a block (B) to be coded and neighboring blocks (B1, B2, B3), according to the present invention;

FIG. 7 shows a first example of the relation between a block to be coded and its neighboring blocks;

FIG. 8 shows a second example of the relation between a block to be coded and its neighboring blocks;

FIG. 9 shows a third example of the relation between a block to be coded and its neighboring blocks;

FIG. 10 shows a fourth example of the relation between a block to be coded and its neighboring blocks;

FIG. 11 is a diagram for explaining the background of using gradients during prediction, according to the present invention;

FIG. 12 is a flow diagram showing a predictive video coding procedure according to the present invention;

FIG. 13 is a schematic diagram of a texture encoder according to the present invention;

FIG. 14 is a detailed block diagram of a transform coefficient and video information encoder shown in FIG. 13; and

FIG. 15 is a detailed block diagram of a predictive block selector shown in FIG. 14.

DESCRIPTION OF THE ILLUSTRATED EMBODIMENTS

In MPEG-4, which is under normalizing work, VOP (video Object Plane) based video signal coding methods, including the conventional block-oriented coding method, are currently investigated. The development of MPEG-4 is initiated by the necessity of supporting next-generation video and audio applications, which cannot be supported by the conventional standards.

The MPEG-4 provides novel methods for communicating, accessing and manipulating video and audio data, e.g., an object-oriented interactive function and connection through networks having different features. Also, the MPEG-4 provides useful operating characteristics under a communication environment where error are liably generated or a low-transmission rate environment. Further, natural video and audio, and artificial video and audio can be altogether coded and manipulated by integrating computer graphics technology.

Briefly, the MPEG-4 must support all functions required and expected by various application fields. Therefore, the MPEG-4 will have an extendible and open structure so that it can support the functions requested by the every possible application field, which has been newly developed or to be developed, at a low cost but with performance. Among the requested functions, coding efficiency is important for low cost, efficient transmission and storage.

As the applications expected to adopt the MPEG-4, there are IMM (Internet Multimedia), IVG (Interactive Video Games), IPC (Interpersonal Communications) such as a video conference or video-phone, ISM (Interactive Storage Media), MMM (Multimedia Mailing), WMM (Wireless Multimedia), NDB (Networked Database Service) using ATM network, RES (Remote Emergency Systems), RVS (Remote Video Surveillance) and so on.

To support the conventional applications or expected applications, there is a need for a video coding technology by which users can communicate with only their desired objects in a video, access thereto for searching and reading, and edit for cutting and pasting. In order to meet such demands, as a new video and audio coding technology, the MPEG-4 is currently under study.

The VOP is a coding unit for coding only a desired object by partitioning a picture in the unit of objects. For example, if a child and a cat are present in a screen, the screen can be partitioned into parts of a background VOP0, a child VOP1 and a cat VOP2. Thus, coding can be performed by VOP. To this end, shape information which can differentiate the respective objects from one another is necessary. The shape information is different for the respective VOPs.

FIG. 5 shows a VOP-based video encoder (hereinafter VOP encoder) of MPEG-4, which has a structure different from that of H.261, H.263, MPEG- 1 or MPEG-2, which are conventional video coding standards. Particularly, the remarkable difference is introduction of shape coder and VOP concepts.

In the video object plane (VOP) video encoder, if VOPs for the videos formed by the VOP forming portion 11 are input to a motion estimation portion 31, the motion estimation portion 31 estimates the motion in the unit of macroblocks from the input VOPs. Also, the motion information estimated from the motion estimation portion 31 is input to a motion compensation portion 32 to compensate the motion thereof. The VOP to be compensated by the motion compensation portion 32 is input to a subtractor 33 together with the input VOP formed by the VOP forming portion 11, to then detect difference value therebetween. The difference value detected by the subtractor 33 is input to a texture encoder 34 so that the internal information of an object to be coded into 8H8 blocks of the macroblock.

The VOP (video object plane) to be compensated by the motion compensation portion 32 and the internal information of the object to be coded and reconstructed by the texture coder 34 are input to an adder 35 to then be added. The output signal of the adder 35 is input to a previously reconstructed VOP storage portion 36 to then output a previously reconstructed VOP which is a directly previous picture of a current picture. Also, the previously reconstructed VOP output from the previously reconstructed VOP storage portion 36 is input to the motion estimation portion 31 and the motion compensation portion 32 to be used for motion estimation and motion compensation. The VOP formed by the VOP forming portion 11 is input to the shape coder 37 so that the shape information is coded. Here, the usage of the shape coder 37 can be switched according to the applications to which the VOP coder is adopted. For easier explanation, information flows related to shape information are represented by a dotted line. As indicated by a dotted line, the output signal of the shape coder 37 is input to the motion estimation portion 31, motion compensation portion 32 and texture coder 34 to be used for motion estimation, motion compensation and texture coding of the unit of objects.

The motion information estimated by the motion estimation portion 31, internal information of the object coded by the texture coder 34 and shape information coded by the shape coder 37 are applied to a multiplexer 38 to then be multiplexed.

Hereinafter, the operation of the VOP coder according to a preferred embodiment of the present invention will be described.

FIG. 13 is a schematic diagram of a texture coder according to the present invention.

As shown in FIG. 13, the texture coder includes an object boundary block padding portion 40 for receiving a video signal and original shape information, a DCT portion 50 for receiving the video signal output from the object boundary block padding portion 40 to perform a DCT, quantizing the transform coefficient and outputting the quantized coefficient, a transform coefficient and video information coder 60 for predictively coding DC coefficients using a spatial correlation (gradient) among the coded DC values of a plurality of neighboring blocks of the block to be coded, an IDCT portion 70 for receiving the quantized transform coefficient from the DCT portion 50 and inversely quantizing the same, filtering the transform coefficient and performing an IDCT, and a padded data eliminating portion 80 for receiving the video signal output from the IDCT 70 and reconstructed shape information, eliminating the padded data, and outputting the reconstructed object signal.

The transform coefficient and video information coder 60 includes a DC coefficient storage portion 61 for storing the DC coefficient (DC_B) obtained from the DCT portion 50, a predictive block selector 62 for selecting a predictive block by using the DC coefficients (DC_Bi) of three neighboring blocks of the current block, obtained from the DC coefficient storage portion 61, and a DPCM coder 63 for DPCM-coding the predictive value DC_P obtained from the predictive block selector 62 and the quantized DC coefficient of the current block, obtained from the DCT portion 50, as shown in FIG. 14.

In FIG. 14, x which is input to the DC coefficient storage portion 61 is an index for the position of the block B of the overall blocks, DC_Bi is an index for the three neighboring blocks of the current block Bx, where i=1, 2 and 3.

FIG. 15 shows a detailed block diagram of the predictive block selector 62, which includes a memory 62 a for storing DC coefficients three neighboring blocks of the current block, obtained from the DC coefficient storage portion 61, first and second subtractors 62 b and 62 c for selectively taking two among indices for the three blocks and mutually subtracting the same, first and second absolute value calculators 62 d and 62e for calculating absolute values output from the first and second subtractors 62 b and 62 c, a comparator 62 f for comparing the respective absolute values obtained from the first and second absolute value calculators 62 d and 62 e, and generating a selection control signal for selecting a predictive block according to the comparison result.

According to the present invention having the aforementioned configuration, an input video signal is DCT-performed and then a DC coefficient is predictively coded using a spatial correlation (gradient) between coded DC values of a plurality of neighboring blocks of a current block to be coded, for enhancing the coding efficiency of the quantized DC coefficient.

Here, the gradient indicates the deviation degree between another two points, on the basis of a point.

The three points are mean values DC coefficients of the respective blocks. On the basis of a block, the gradient is calculated to understand the deviation degree of a basis point and neighboring blocks, i.e., the difference of magnitudes of DC signal values within the block.

In FIG. 11, A is a point block which is the basis for calculating the gradient, B is a top block, C is a left block and D is a block to be coded. Here, the target to be coded is the DC value of the block D quantized after performing DCT (to be referred to as a DCQ). Similarly, the DC values of A, B and C blocks are transmitted to a decoder after already being coded.

In the conventional standards such as MPEG-1, MPEG-2 or H.263, the method of transmitting the coded values after performing the texture coding, to the decoder, will now be described.

First, transform coding is performed using 8*8 DCT (Discrete Cosine Transform) in the unit of blocks. This is for enhancing the coding efficiency by reducing the spatial redundancy between signals within a block.

Second, the DCT coefficient generated in the first step is quantized using a value (a quantization step size) defined according to a rate control policy and method, to then be coded. Typically, DC values are quantized with a quantization of step size of 8, and, AC values are quantized with a defined quantization step size, which is expressed in the following equation: DCQ=CD/8(Level=DCQ) ACQ=AC/q−step(Level=ACQ) where q-step is a quantization step size arbitrarily defined according to a rate control, which is permitted from 0-31, and the Level represents the value after being quantized.

Third, the DCQ and ACQ are transformed into values DCV and ACV to be transmitted to a decoder through a PCM (Pulse Code Modulation) or DPCM (Differential Pulse Code Modulation).

Fourth, the DCV and ACV are coded according to a VLC (Variable Length Code) which combines last, run and level according to a zig-zag scanning order, to then be transmitted. All DCV or ACV are encoded and transmitted to a decoder as a combination of three kinds, namely, a last indicative of whether or not the transform coefficient being currently encoded is the last non-zero transform coefficient, a run indicative of the number of successive zero transform coefficients preceding the current non-zero coefficient, and a level indicative of the magnitude of the current transform coefficient.

After the coding and transmission are performed in such a manner, decoding is performed in the reverse order of the first through fourth steps.

The DC value represents a characteristic of a signal (texture) of the corresponding block, and the characteristic of the texture of a block to be coded, i.e., the magnitude, is known.

In addition, when the pixels of the block to be coded have the same value, the texture coding efficiency is the highest, which is because only the DC value exists.

Generally, signals within a picture are divided into many sections, and the boundary portions therebetween are exhibited as high frequencies during the transform coding. Therefore, during predictive coding using the DC information (value) of neighboring blocks, it is very important to know the high-frequency boundaries exactly for minimizing a differential value and reducing the quantity of transmission bits.

When the DPCM is performed between blocks positioned in the high-frequency boundary, at worst, much more bits may be generated, compared to the case when the PCM is performed. Therefore, if the gradient of DC values of the neighboring blocks to the block to be coded are used, the high-frequency boundary of the neighboring blocks of the target block to be coded can be known. Using the information, the DC differential value between blocks belonging to an identical section is coded, thereby maximizing the predictive coding efficiency.

In the present invention using such a principle, as shown in FIG. 12, first, the quantized DC value (DC_B) is input from the DCT portion 50. Second, the indices of three neighboring blocks of the current block are selected from the DC coefficient storage portion 61, to then transmit the same to the predictive block selector 62. In object unit coding as discussed above, there may be a block that is not an object in one macroblock. In such a case where a block is outside of the object, DC values do not exist. Accordingly, different rules are required, which is described below. Moreover, whether a block is in or out of the object in object unit coding may be determined by the input of shape information to the predicitive block selector 62. Then the predictive block selector 62 detects whether one or more blocks among the three neighboring blocks are positioned outside the object.

Next, as the detection result, if a block is positioned outside the object, the predictive block and prediction coefficient are determined by the following exception rules. Since the predictive block is determined using the information of neighboring blocks, this method may be implemented in a decoder. Accordingly, no additional information need be transmitted to determine the predictive block.

On the contrary, if three blocks are all positioned within the object, one of the left and upper blocks, having the larger absolute value of the gradient between the quantized DC values of a left upper block and a left block and a left upper block and a upper block, is selected as the predicted reference block, to then obtain the quantized DC value of the predicted block. Thereafter, it is detected whether the DC quantized steps of the reference block and coded block are different in DC quantization levels from each other. If different, the quantized DC value of the reference block is normalized by quantizing using the quantization step size of the block to be coded.

After the normalizing procedure or if the DC quantization levels of the predicted block and coded block are the same to each other, the DC value of the current block and the quantized DC value of the predicted block are DPCM-performed.

In the present invention coding procedures of six times in total are performed for each macroblock, i.e., four times for the luminance (L1, L2, L3 and L4) and two times for chrominance (C1 and C2), and the coding order is the same as that of MPEG-2.

The three neighboring blocks B1, B2 and B3 of the block B currently being coded are defined for coding the DC coefficients, as shown in FIG. 6.

Here, for the convenience's sake, the block to be coded is indicated as B, the left upper block is indicated as B1, the upper block is indicated as B2 and the left block is indicated as B3. Three neighboring blocks, B1, B2, and B3 are already coded and transmitted to a decoder.

Also, it is assumed that the quantized DC coefficient of the block B is represented by DC_B, the DC coefficient of the block B1 is represented by DC_B1, the DC coefficient of the block B2 is represented by DC_B2, the DC coefficient of the block B3 is represented by DC_B3, and the predictive value for predictively coding the quantized DC coefficient DC_B of the block B is represented by DC_P, the predictively coded DC value for the current block B to be As mentioned above, DC_P is the quantized DC value of the predictive block using the quantization step size of the current block.coded and transmitted to the decoder is represented by DC_T. Then, the DC_T can be defined as follows: DC _(—) T=(DC _(—) P−DC _(—) B) or DC _(—) T=(DC _(—) B−DC _(—) P) When a picture is partitioned into 16* 16 pixels in X and Y axes, i.e., by a macroblock size, if the X-axis coordinate of the macroblock is zero (the left boundary of a frame), the predictive coding values of the first luminance blocks L1 and L3 of FIG. 4 in the macroblock are set as 128, and the predictive coding values of the chrominance blocks C1 and C2 of FIG. 4 are all set as 128.

Also, if the Y-axis coordinate of the macroblock is zero (the upper boundary of a frame), the predictive coding values of the first luminance blocks L1 and L2 of FIG. 4 in the macroblock are set as 128, and the predictive coding values of the chrominance blocks C1 and C2 of FIG. 4 are all set as 128.

Under such conditions, in the case of a VOP or object based coding using the actual shape information, the DC predictive coding is performed as follows.

First, assuming that the block to be coded is represented by B, the quantized DC value DC_B output from the DCT portion 50 is input to the DC coefficient storage portion 61 and the DPCM encoder 63 of the transform coefficient and video information coder 60, respectively.

The DC coefficient storage portion 61 outputs DC coefficients DC_Bi (i=1, 2 and 3) of the three neighboring blocks B1, B2 and B3, already stored, using the index of input coefficient for the block B as indices X−1, X, X+1 and X+2. For the selection of DC_Bi among the stored DC coefficients, the positioning index of the block B ( . . . , X−1, X, X+1, X+2 . . . in FIG. 15) is used.

Then, as shown in FIG. 15, the predictive block selector 62 temporarily stores the DC coefficients of the three neighboring blocks in the memory 62 a, and the first subtractor 62 b mutually subtracts the DC coefficient DC_B1 of the block B1 and the DC coefficient DC_B2 of the block B2 and inputs the result value thereof to the first absolute value calculator 62 d.

Also, the second subtractor 62 c mutually subtracts the DC coefficient DC_B2 of the block B1 and the DC coefficient DC_B3 of the block B3 and inputs the result value thereof to the second absolute value calculator 62 e.

Then, the first and second absolute value calculators 62 d and 62 e calculate the absolute values of the input values, and the absolute values are input to the comparator 62 f, respectively. The comparator 62 f compares two values, and transmits the result signal to the memory 62 a via an address so that the DC coefficient of the reference block B to be coded is output for predictively coding the DC coefficient of the block B to be coded.

Accordingly, the memory 62 a outputs the predictive value for predictively coding the DC coefficient of the block B corresponding to the address, and transmits the same to the DPCM encoder 63.

Then, the DPCM encoder 63 performs DPCM coding on the predictive value DC_P (quantized value using the quantization step size of the current block, if necessary) for predictively coding the input block B and the quantized DC coefficient DC_B of the block B, obtained from the DCT portion 50, and outputs the predictively coded DC value of the current block B to be transmitted to the decoder.

Hereinafter, the selection of a predictive block for DC predictive coding, depending on the presence of shape information of the neighboring blocks B1, B2 and B3 of the block B, and the DC predictive coding procedure of the current block using the selected DC value, will be described in more detail.

First, in the case when the neighboring blocks B1, B2 and B3 of the block B are all intrablocks, the absolute value |DC_B1−DC _B2| of the result of subtracting the DC coefficient DC_B2 of the block B2 from the DC coefficient DC_B1 of the block B1, is compared with that |DC_B1−DC _B3| of the result of subtracting the DC coefficient DC_B3 of the block B3 from the DC coefficient DC_B1 of the block B1. Then, if

|DC_B1−DC_B2|<|DC_B1−DC_B3|, since the spatial correlation between the block B1 and the block B2 is large that is the spatial correlation between the block B3 and the block B is large. DC predictive coding is performed by selecting a predictive value DC_P for predictively coding the DC_B of the block B as the quantized DC coefficient DC_B3 of the block B3. Also, if |DC_B1−DC_B2|>|DC_B1−DC_B3|, DC predictive coding is performed by selecting a predictive value DC_P for predictively coding the DC_B of the block B as the quantized DC coefficient DC_B2 of the block B2 using the quantization step size of the block B.

Next, if the neighboring block B2 and B3 of the block B is outside the object, as shown in FIG. 7, the predictive value DC_P for predictively coding the DC_B of the block B is set as 128 to then perform DC predictive coding.

Also, as shown in FIG. 8, if shape information is present only in the block B3, the predictive value DC_P for predictively coding the DC_B of the block B is selected as the DC coefficient DC_B3 of the block B3 to then perform DC predictive coding.

Similarly, as shown in FIG. 9, if shape information is present only in the block B2, the predictive value DC_P for predictively coding the DC_B of the block B is selected as the DC coefficient DC_B2 of the block B2 to then perform DC predictive coding.

Also, as shown in FIG. 10, if shape information is present in the neighboring blocks B2 and B3 of the block B but is not present in the block B1, the predictive value DC_P for predictively coding the DC_B of the block B is selected as the DC coefficient DC_B3 of the block B3 or the DC coefficient DC_B2 of the block B2 to then perform DC predictive coding.

Alternatively, if shape information is present in the neighboring blocks B2 and B3 of the block B but is not present in the block B1, the predictive value DC_P is set as 128 to then perform DC predictive coding.

Now, there may exist exceptional circumstances probably generated when performing the coding using the shape information in the manner as described above, and the predictive coding method thereof will be described.

If shape information is not present in the neighboring blocks B2 and B3 of the block B to be coded but is present only in the block B1, the predictive value DC_P for predictively coding the DC_B of the block B is set as the quantized DC coefficient DC_B1 of the block B1 using the quantization step size of the block B, to then perform DC predictive coding. Otherwise, if shape information is present in the neighboring blocks B2 and B3 of the block B to be coded but is not present only in the block B1, the predictive value DC_B1 for predictively coding the block B1 is set as 128, to then obtain the predictive value DC_P for predictively coding the block B.

In other words, the absolute value |128−DC_B2| of the result of subtracting the DC coefficient DC_B2 of the block B2 from the predictive value DC_B1 for predictively coding the block B1 (128), is compared with that 128−DC_B3| of the result of subtracting the DC coefficient DC_B3 of the block B3 from the predictive value for predictively coding the block B1 (128), and DC predictive coding is performed by selecting a predictive value DC_P for predictively coding the DC_B of the block B as the DC coefficient DC_B3 of the block B3 if |128−DC_B2|<|128−DC_B3|. Otherwise, if |128−DC_B2|>|128−DC_B3|, the predictive value DC_P for predictively coding the DC_B of the block B is set as the DC coefficient DC_B2 of the block B2, to then perform DC predictive coding.

Next, another coding method for the probable exceptional circumstances may be considered, and the coding method thereof will now be described.

If shape information is not present in the blocks B2 and B3 but is present only in the block B1, the predictive value DC_P for predictively coding the DC_B of the block B is set as the DC coefficient obtained by adding 128 to the DC coefficient DC_B1 of the block B1, that is, DC_B1+128, and dividing the adding result by 2, that is, (DC_B1+128)/2, and then rounding off or cutting the fractions to the decimal places, to then perform DC predictive coding.

Also, if shape information is present only in the block B3, the predictive value DC_P for predictively coding the DC_B of the block B is set as the DC coefficient obtained by adding 128 to the DC coefficient DC_B3 of the block B3, that is, DC_B3+128, and dividing the adding result by 2, that is, (DC_B3+128)/2, and then rounding off or cutting the fractions to the decimal places, to then perform DC predictive coding.

If shape information is present only in the block B2, the predictive value DC_P for predictively coding the DC_B of the block B is set as the DC coefficient obtained by adding 128 to the quantized DC coefficient DC_B2 of the block B2, that is, DC_B2+128, and dividing the adding result by 2, that is, (DC_B3+128)/2, and then rounding off or cutting the fractions to the decimal places, to then perform DC predictive coding.

Further, if shape information is present in the blocks B2 and B3 but is not present in the block B1, the predictive value DC_P for predictively coding the DC_B of the block B is set as the DC coefficient obtained by adding the DC coefficient DC_B3 of the block B3 to the DC coefficient DC_B2 of the block B2, that is, DC_B2+DC_B3, and dividing the adding result by 2, that is, (DC_B2+DC_B3)/2, and then rounding off or cutting the fractions to the decimal places, to then perform DC predictive coding.

Heretofore, the coding method has been described in the case when the quantization step sizes of the block B and its three neighboring blocks B1, B2 and B3 are the same to one another. If the DC coefficient storage portion stores the quantized DC coefficient of the block B. B1, B2 and B3, and the quantization step sizes (to be referred to as Q_step, hereinafter) of the block B and its three neighboring blocks B1, B2 and B3 are different from one another, DC_B is predictively coded using the aforementioned coding method after normalizing the DC values of the four blocks B, B1, B2 and B3.

Here, assuming that the quantization step size of the block B is Q_B, the quantization step size of the block B1 is Q_B1, the quantization step size of the block B2 is Q_B2, the quantization step size of the block B3 is Q_B3, and the normalized DC values of the blocks B, B1, B2 and B3 are N_DC_B1, N_DC_B, N_DC_B2 and N_DC_B3 respectively, the DC normalizing method—is—performed as follows. N _(—) DC _(—) B=DC _(—) B * Q_B N _(—) DC _(—) B1=DC _(—) B1* Q_B1 N _(—) DC _(—) B2=DC _(—) B2* Q_B2 N _(—) DC _(—) B3=DC _(—) B3* Q_B3

After performing normalization in such a manner, the predictive value DC_P for predictively coding the block B to be coded is obtained in the following manner.

If DC_P equals to N_DC_B2, the DC_T equals to N_DC_B2/Q_B−DC_B. Also, if DC_P equals to N_DC_B3, the DC_T equals to N_DC_B3/Q_B−DC_B.

According to another embodiment of the present invention, even if the quantization step sizes of three blocks are different from one another, a predictive block and a predictive coefficient are first selected according to gradients, and then the selected predictive coefficient is normalized as follows: DC _(—) P=(DC _(—) P*DC _(—) PQ)Q _(—) B where DC_PQ corresponds to Q_B2 if DC_P equals to DC_B2, and corresponds to Q_B3 if DC_P equals to DC_B3.

As described above, according to the present invention, the quantity of transmitted information can be reduced by predictively coding DC coefficients of a block to be coded using DC gradients of three neighboring blocks of the block to be coded, thereby maximizing the coding efficiency. 

1. A method for coding a video signal, comprising: sampling a video signal into a plurality of blocks; transforming the video signal of each block into a two dimensional array of discrete cosine transform (DCT) coefficients having a DC coefficient and a plurality of AC coefficients; and predicting a predictive DC coefficient of a block from either a left block or an upper block based on comparison of a vertical gradient and a horizontal gradient, the vertical gradient from a DC coefficient of a left upper block to a DC coefficient of the left block, and the horizontal gradient from the DC coefficient of the left upper block to a DC coefficient of the upper block.
 2. The method of claim 1, wherein the step of predicting a predictive DC coefficient comprises: comparing the vertical gradient with the horizontal gradient; selecting the DC coefficient of the upper block as the predictive DC coefficient of the block if the horizontal gradient is larger than the vertical gradient; and selecting the DC coefficient of the left block as the predictive DC coefficient of the block if the horizontal gradient is not larger than the vertical gradient.
 3. The method of claim 1, further comprising: encoding a DC residual, the DC residual being a differential value between a transformed DC coefficient of the block and the predictive DC coefficient of the block.
 4. The method of claim 1, further comprising: quantizing the DCT coefficients.
 5. The method of claim 1, wherein the DC coefficient of the left block or the DC coefficient of the upper block is set to a predetermined value.
 6. The method of claim 5, wherein the predetermined value is a function of a quantization step size and a bits per pixel value, and equals 2^((bits) ^(—) ^(per) ^(—) ^(pixel+2))/(quantization step size).
 7. The method of claim 1, wherein the step of predicting a predictive DC coefficient is performed for a macroblock having a plurality of blocks.
 8. An apparatus to code a video signal, comprising: a sampling portion that samples a video signal into a plurality of blocks; a discrete cosine transform (DCT) portion that transforms the video signal of each block into a two dimensional array of DCT coefficients having a DC coefficient and a plurality of AC coefficients; and a predictive block selector that predicts a predictive DC coefficient of a block from either a left block or an upper block, the predictive block selector comprising: a horizontal gradient calculator that determines a horizontal gradient of DC coefficients from a DC coefficient of a left upper block to a DC coefficient of the upper block, a vertical gradient calculator that determines a vertical gradient of DC coefficients from the DC coefficient of the left upper block to a DC coefficient of the left block, a comparator that compares the horizontal gradient with the vertical gradient, and a DC predictor that determines a predictive DC coefficient of the block based on the comparison of the vertical gradient and the horizontal gradient.
 9. The apparatus of claim 8, wherein the DC predictor selects the DC coefficient of the upper block as the predictive DC coefficient of the block if the horizontal gradient is larger than the vertical gradient, and selects the DC coefficient of the left block as the predictive DC coefficient of the block if the horizontal gradient is not larger than the vertical gradient.
 10. The apparatus of claim 8, further comprising: a coder that encodes a DC residual, the DC residual being a differential value between a transformed DC coefficient of the block and the predictive DC coefficient of the block.
 11. The apparatus of claim 8, further comprising: a quantizer that quantizes the DCT coefficients with a quantization step size.
 12. A method for decoding a video signal comprising a plurality of blocks, the method comprising: determining a horizontal gradient from a reconstructed DC coefficient of a left upper block to a reconstructed DC coefficient of a upper block determining a vertical gradient from the reconstructed DC coefficient of the left upper block to a reconstructed DC coefficient of a left block; and predicting a predictive DC coefficient of a block from either the upper block or the left block.
 13. The method of claim 12, wherein the step of predicting a predictive DC coefficient comprises: comparing the vertical gradient with the horizontal gradient; selecting the reconstructed DC coefficient of the upper block as the predictive DC coefficient of the block if the horizontal gradient is larger than the vertical gradient; and selecting the reconstructed DC coefficient of the left block as the predictive DC coefficient of the block if the horizontal gradient is not larger than the vertical gradient.
 14. The method of claim 12, further comprising: reconstructing a reconstructed DC coefficient of the block by adding the predictive DC coefficient of the block with a coded DC residual, the coded DC residual being a differential value between the reconstructed DC coefficient of the block and the predictive DC coefficient.
 15. The method of claim 14, further comprising: inverse quantizing the reconstructed DC coefficient according to a quantization step size.
 16. The method of claim 12, wherein the reconstructed DC coefficient of the left block or the reconstructed DC coefficient of the upper block is set to a predetermined value.
 17. The method of claim 16, wherein the predetermined value is a function of a bits per pixel value, and equals 2^((bits) ^(—) ^(per) ^(—) ^(pixel+2)).
 18. The method of claim 16, wherein the step of predicting a predictive DC coefficient is performed for a macroblock having a plurality of blocks.
 19. An apparatus to decode a video signal comprising a plurality of blocks, the apparatus comprising: a horizontal gradient calculator that determines a horizontal gradient of DC coefficients from a DC coefficient of a left upper block to a DC coefficient of an upper block, a vertical gradient calculator that determines a vertical gradient of DC coefficients from the DC coefficient of the left upper block to a DC coefficient of the left block; a comparator that compares the horizontal gradient with the vertical gradient, and a DC predictor that determines a predictive DC coefficient of a block based on the comparison of the horizontal gradient and the vertical gradient.
 20. The apparatus of claim 19, wherein the DC predictor selects the DC coefficient of the upper block as the predictive DC coefficient of the block if the horizontal gradient is larger than the vertical gradient and selects the DC coefficient of the left block as the predictive DC coefficient of the block if the horizontal gradient is not larger than the vertical gradient.
 21. The apparatus of claim 19, further comprising: a decoder that reconstructs a reconstructed DC coefficient of the block by adding the predictive DC coefficient of the block with a coded DC residual, the DC residual being a differential value between the reconstructed DC coefficient of the block and the predictive DC coefficient of the block.
 22. The apparatus of claim 19, further comprising: an inverse quantizer that de-quantizes the reconstructed DC coefficient according to a quantization step size.
 23. A method for forming a bitstream representing video information, comprising: sampling a video signal into a plurality of blocks; transforming the video signal of the blocks into a two dimensional array of discrete cosine transform (DCT) coefficients having a DC coefficient and a plurality of AC coefficients; calculating a vertical gradient from a DC coefficient of a left upper block to a DC coefficient of a left block; calculating a horizontal gradient from a DC coefficient of the left upper block to a DC coefficient of an upper block; comparing the vertical gradient with the horizontal gradient; selecting the DC coefficient of the upper block as the predictive DC coefficient of a block if the horizontal gradient is larger than the vertical gradient; selecting the DC coefficient of the left block as the predictive DC coefficient of the block if the horizontal gradient is not larger than the vertical gradient; and encoding a DC residual, the DC residual being a differential value between a transformed DC coefficient of the block and the predictive DC coefficient of the block.
 24. A bitstream representing video information formed by the method of claim
 23. 